package com.longway.common.rateLimiter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface RequestLimit {
    /**
     * 
     * 允许访问的次数，默认值MAX_VALUE
     */
    long count() default Integer.MAX_VALUE;
 
    /**
     * 
     * 时间段，单位为秒，默认值一分钟
     */
    int time() default 60;
}

